#ifndef HEADER_H
#define HEADER_H

#include <stdio.h>
#include <pthread.h>
#include <curl/curl.h>
#include <unistd.h>
#include <assert.h>
#include <string>
#include <vector>
#include <set>
#include <stdlib.h>
#include <ncurses.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>


struct ThreadInfo {
    int id;			//number
    FILE *fp;			///file descriptor
    off_t length;		///file length
    off_t seek;			///current file position
    off_t end;			///file block end position
    char *url;			///URL
    CURL *curl;
    pthread_t *thread;
     std::vector < struct ThreadInfo >*vecptr;
    uint working_thread_first;
    uint working_thread_last;
    int pipe[2];
    bool cancel;
};

#endif
